<?php
/**
 * Created by b17
 * 2/28/12 9:04 PM
 */

class Cron
{
    /**
     * @var Task[]
     */
    private $_tasks = array();

    public function add(Task $task)
    {
        $this->_tasks[] = $task;
        return $this;
    }

    public function run()
    {
        foreach ($this->_tasks as $task) {
            $task->run();
        }
    }
}
